package com.yingsheng.bi.hks.web.controller;

import com.yingsheng.bi.hks.dto.merch.*;
import com.yingsheng.bi.hks.feign.client.MerchFeignClient;
import com.yingsheng.bi.hks.service.merch.MerchMgmtService;
import com.yingsheng.bi.hks.template.annotation.Template;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商户信息维护
 */
@RestController
public class MerchCtrl implements MerchFeignClient {

    @Autowired
    private MerchMgmtService merchMgmtService;

    @Template(name = "accessTransTemplate")
    @Override
    public MerchAddRes add(MerchAddReq req) {
        return merchMgmtService.add(req);
    }

    @Template(name = "accessTransTemplate")
    @Override
    public MerchModRes mod(MerchModReq req) {
        return merchMgmtService.mod(req);
    }

    @Template(name = "accessQueryTemplate")
    @Override
    public MerchQryRes qry(MerchQryReq req) {
        return merchMgmtService.qry(req);
    }

    @Template(name = "accessTransTemplate")
    @Override
    public MerchDelRes del(MerchDelReq req) {
        return merchMgmtService.del(req);
    }
}
